﻿function HandleError() {
    return true;
}        
window.error = HandleError;

/*
if (self != top) 
    top.location.replace(self.location);

if(window.location.hostname != 'www.123mua.com.vn' 
       && window.location.hostname != '123mua.com.vn'
       && window.location.hostname != 'localhost')
          window.location = 'http://www.123mua.com.vn';           
*/        

var refeshPageTimer = null;

function RefeshPage()
{
    if(typeof(isPost) == 'undefined')
    {
        window.location.reload();
    }
}

refeshPageTimer = setTimeout("RefeshPage()", 1200000);

function setHomePage2()
{
    var isIE= navigator.userAgent.indexOf('MSIE') != -1;
    
    if(isIE)
    {
        var url = 'http://www.123mua.com.vn';
        
        var homePage = document.body;
        
        homePage.style.behavior = 'url(#default#homepage)';
        homePage.setHomePage(url);
    }
    else
    {
        alert('Nhấn tổ hợp phím [Ctrl+D] để đặt kenh24h làm homepage!');
    }
}

function addFavorite2()
{
    var url = window.location.href;
    var title = document.title;
    
    if(document.all)
    {
        window.external.AddFavorite(url, '123mua - ' + title);
    }
    else if(window.sidebar)
    {
        window.sidebar.addPanel('123mua - ' + title, url, '');
    }
}

